<?php
/**
 * Description: 拓声官网首页
 * User: kanglin
 * Date: 2017/9/4
 * Time: 14:50
 * Created by Created by Panxsoft.
 *
 * @see \App\Http\Controllers\Home\HomeController::index()
 */
?>

{{-- 继承布局模板 --}}
@extends( 'official_website.layouts.main' )


{{--  当前页面的样式表 --}}
@section('style')
    <link rel="stylesheet" href="">
    <link rel="stylesheet" href="{{asset('css/home.css')}}">
@endsection()


{{-- 插入标题 --}}
@section('title')
    <title>首页 - 广州市拓声电子科技有限公司</title>
@endsection


@section('content')
    {{--  @json($product_categories)  --}}

    <!-- 焦点轮播banner -->
    <div class="index-banner-wrapper swiper-container" id="index_banner_wrapper">
        <div class="swiper-wrapper">
            @foreach($banners as $banner)
            <div class="swiper-slide" style="background-image:url({{ $banner->image }})">
                {{--  <div class="index-banner"><img src="" alt=""></div>  --}}
            </div>
            @endforeach()
        </div>
        <!-- Add Pagination -->
        <div class="swiper-pagination"></div>
        <!-- Add Arrows -->
        <div class="swiper-button-next" @click="next()"></div>
        <div class="swiper-button-prev" @click="prev()"></div>

        <div class="banner-intro">
            <ul class="banner-intro-list bym-not-list bym-wrapper">
                <li class="banner-intro-list-item clearfix location">
                    <i class="icon">
                        <img src="http://gz.bcebos.com/panx-website/images/home/company_icon1.png" alt="">
                    </i>
                    <div class="content">
                        <h3 class="content-title">
                            经营理念
                        </h3>
                        <p class="content-desc">
                            {{ $about_us->business_concepts }}
                        </p>
                    </div>
                </li>
                <li class="banner-intro-list-item clearfix vision">
                    <i class="icon">
                        <img src="http://gz.bcebos.com/panx-website/images/home/company_icon2.png" alt="">
                    </i>
                    <div class="content">
                        <h3 class="content-title">
                            企业使命
                        </h3>
                        <p class="content-desc">
                            {{ $about_us->business_miss }}
                        </p>
                    </div>
                </li>
                <li class="banner-intro-list-item clearfix culture">
                    <i class="icon">
                    <img src="http://gz.bcebos.com/panx-website/images/home/company_icon3.png" alt="">
                    </i>
                    <div class="content">
                        <h3 class="content-title">
                            企业精神
                        </h3>
                        <p class="content-desc">
                            {{ $about_us->business_spirit }}
                        </p>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    <!-- 焦点轮播banner end -->


    <!-- 关于我们 -->
    <section class="about-us">

        <div class="bym-wrapper clearfix">

            <div class="about-us-pic"></div>

            <article class="about-us-content">
                
                <div class="about-us-content-title">
                    关于我们
                </div>

                <p>{!! $about_us->about_us !!}</p>

                <p class="about-company">经营理念：{{ $about_us->business_concepts }}</p>
                <p class="about-company">企业使命：{{ $about_us->business_miss }}</p>
                <p class="about-company">企业精神：{{ $about_us->business_spirit }}</p>

                <a href="{{route('about')}}">@lang('home.about.button')</a>
            </article>

        </div> 
    </section>
    <!-- 关于我们 END-->

    <!-- 产品和服务 -->
    <section class="service" id="product_sevice">
        <div class="service-header">
            产品分类
        </div>

        <!-- Swiper -->
        <div class="service-content">
            <div class="swiper-container" ref="product-sevice-swiper">
                <div class="swiper-wrapper">

                    @foreach($product_categories as $product_category)
                    <div class="swiper-slide">
                        <div class="pic">
                            <a href="{{ route('production')."?pid={$product_category->id}" }}">
                                <img src="{{$product_category->thumb}}" alt="">
                            </a>
                        </div>
                        <div class="content">
                            <h4>{{$product_category->name}}</h4>
                            <p>{{$product_category->description}}</p>
                        </div>
                    </div>
                    @endforeach

                </div>
            </div>
        </div>
    </section>
    <!-- 产品和服务 END -->

    <!-- 企业动态 -->

    <section class="news" id="news" v-cloak>

        <div class="bym-wrapper clearfix">

            <div class="news-title">
                企业动态
            </div>

            <div class="news-content">
                <ul class="news-nav clearfix">
                    <li v-for="(type,key) in sub_types" :key="key" :class="[String(article_type_id) === String(type.id)? 'active':'']">
                        <a href="javascript:;" @click.prevent="changeTag(type.id)" >
                            @{{ type.name }}
                        </a>
                    </li>
                </ul>
                <ul class="news-list" v-if="!loading && article_list.length > 0">
                    <li class="news-list-item" v-for="item in article_list">
                        <a :href="'/news?article_type_id=' + item.article_type_id + '&detail_id=' + item.id ">
                            <span class="news-list-item-title">
                                @{{ item.title }}
                            </span>
                            <span class="news-list-item-date" v-text="item.created_at"></span>
                        </a>
                    </li>
                </ul>

                <div class="news-loading-info" v-show="!loading && article_list.length === 0">
                    @lang('home.news.empty')
                </div>
                <div class="news-loading-info" v-show="loading">
                    <p>@lang('home.news.loading')</p>
                </div>
            </div>

            <div class="news-banner-wrapper swiper-container" ref="news-swiper" v-show="!loading && article_list.length > 0" >
                <div class="swiper-wrapper">
                    <div class="swiper-slide" v-for="item in article_list">
                        <a :href="'/news?article_type_id=' + item.article_type_id + '&detail_id=' + item.id ">
                            <img :src="item.carousel_figure" :alt="item.title">
                        </a>
                    </div>
                </div>
                <!-- 分页 -->
                <div class="swiper-pagination"></div>
                <!-- Add Arrows -->
                <div class="swiper-button-next" @click="next()"></div>
                <div class="swiper-button-prev" @click="prev()"></div>
            </div>
            <div class="news-banner-wrapper swiper-container news-loading-info" v-show="!loading && article_list.length === 0">
                @lang('home.news.empty')
            </div>
            <div class="news-banner-wrapper swiper-container news-loading-info" v-show="loading">
                <p>@lang('home.news.loading')</p>
            </div>
        </div>

        <div class="bym-wrapper">
            <a class="news-btn" href="{{route('news')}}">@lang('home.news.button')</a>
        </div>

    </section>

    <!--  合作伙伴 begin -->
    <section class="partner" id="partner" >
        <div class="bym-wrapper">

            <div class="partner-title">
                @lang('about.partner.title')
            </div>

            <div class="partner-content">
                <div class="swiper-container">
                    <div class="swiper-wrapper">
                        @foreach ($partners as $partner)
                            <div class="swiper-slide">
                                <div class="list-item-thumb">
                                    <img src="{{ $partner->logo }}" alt=""/>
                                    <p class="list-item-name">{{ $partner->name }}</p>
                                </div>
                            </div>
                        @endforeach
                    </div>
                </div>
                
                <!-- 箭头 begin -->
                <div class="partner-content-next">
                    <img src="http://toosound-website.gz.bcebos.com/common/next.png" alt="next">
                </div>
                <div class="partner-content-prev">
                    <img src="http://toosound-website.gz.bcebos.com/common/pre.png" alt="prev">                    
                </div>
                <!-- 箭头 end -->
            </div>
            
        </div>
    </section>
    <!-- 合作伙伴 end -->

    <!-- 合作伙伴 END -->

    <!--  联系我们  -->
    <section class="contact">

        <div class="bym-wrapper">
            <div class="contact-title">
                联系我们
            </div>

            <div class="contact-map">

            </div>

            <ul class="contact-list clearfix">
                <li>
                    <i class="icon">
                        <img src="http://toosound-website.gz.bcebos.com/common/phone_contract_icon.png" alt="">
                    </i>
                    <dl>
                        <dt>@lang('home.contact.telephone.title')</dt>
                        <dd>@lang('home.contact.telephone.content.0')</dd>
                        <dd>@lang('home.contact.telephone.content.1')</dd>
                    </dl>
                </li>
                <li>
                    <i class="icon">
                        <img src="http://toosound-website.gz.bcebos.com/common/email_contract_icon.png" alt="">
                    </i>
                    <dl>
                        <dt>@lang('home.contact.email.title')</dt>
                        <dd>@lang('home.contact.email.content.0')</dd>
                    </dl>
                </li>
                <li>
                    <i class="icon">
                        <img src="http://toosound-website.gz.bcebos.com/common/qq_contract_icon.png" alt="">
                    </i>
                    <dl>
                        <dt>@lang('home.contact.qq.title')</dt>
                        <dd>@lang('home.contact.qq.content.0')</dd>
                    </dl>
                </li>
                <li>
                    <i class="icon">
                        <img src="http://toosound-website.gz.bcebos.com/common/add_contract_icon.png" alt="">
                    </i>
                    <dl>
                        <dt>@lang('home.contact.address.title')</dt>
                        <dd>@lang('home.contact.address.content.0')</dd>
                    </dl>
                </li>
            </ul>

        </div>

    </section>
    <!--  联系我们 END  -->
@endsection


@section('script')
    <!-- 当前页面 -->
    <script src="{{asset('js/home.js')}}" type="text/javascript"></script>
    <script src="{{asset('js/partner.js')}}" type="text/javascript" ></script>
@endsection